<%@page import="entity.Karyawan"%>
<%@page import="java.util.List"%>

<%       
    List<Karyawan> listKry = (List<Karyawan>)session.getAttribute("daftar");
%>
<html>
    <body>
        <h3>Daftar Karyawan</h3>
        <table border="1">
            <tr>
                <td>Nama</td>
                <td>Alamat</td>
                <td>Email</td>
                <td>Telp</td>
                <td>Gaji</td>
                <td>Hapus</td>
            </tr>
            <%  
                int index = 0;
                for(Karyawan kry : listKry){ %>
                <tr>
                    <td><%=kry.getNama()%></td>
                    <td><%=kry.getAlamat() %></td>
                    <td><% out.print(kry.getEmail()); %></td>
                    <td><% out.print(kry.getTelp()); %></td>
                    <td><% out.print(kry.getGaji()); %></td>
                    <td><a href="hapus?index=<%=index%>">Hapus</a></td>
                </tr>    
            <% ++index; }
            %>
        </table>
    </body>
</html>